package com.mjp.learn.design.proxy.dynamicProxy;

import com.mjp.learn.design.proxy.Movable;
import com.mjp.learn.design.proxy.Move;

import java.lang.reflect.Proxy;

public class Test {
    public static void main(String[] args) {
        Movable move = new Move();

        Movable m = (Movable) Proxy.newProxyInstance(Move.class.getClassLoader(), new Class[]{Movable.class}, new MyInvokeHandler(move));
        m.run();

    }
}
